package com.doit.day01;

public class FunctionTest {
    public static void main(String[] args) {
        MyFunction3<Integer, Integer, Integer, Integer> getMax = new MyFunction3<Integer, Integer, Integer, Integer>() {
            @Override
            public Integer apply(Integer a, Integer b, Integer c) {
                int max = a;
                if(max < b) max = b;
                if(max < c) max = c ;
                return max;
            }
        };
        Integer res = getMax.apply(1, 2, 3);
        System.out.println(res);
    }


    //参数是什么？MyFunction3<Integer, Integer, Integer, Integer> getMax
    public static MyFunction3<Integer,Integer,Integer,Integer> haoNan(MyFunction3<Integer, Integer, Integer, Integer> getMax){
        return getMax;
    }
}


